﻿<UserControl x:Class="NexTrackDesktop.Controls.PartyNowPlaying"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="160" d:DesignWidth="700">
    <Grid Height="160">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>

            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10" Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
                BorderBrush="Black" BorderThickness="1" CornerRadius="7" Style="{StaticResource AlbumArtStyle}" DataContext="{Binding NowPlaying}"/>
        <Grid Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30*" />
                <ColumnDefinition Width="60*" />
                <ColumnDefinition Width="10*" />
            </Grid.ColumnDefinitions>
            <!-- TODO album art here-->

            <!--Song Info-->
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50*" />
                    <RowDefinition Height="50*" />
                    <RowDefinition Height="50*" />
                </Grid.RowDefinitions>

                <Label Content="{Binding Path=NowPlaying.Song.Title, FallbackValue=Title?}" />
                <!-- TODO bind to now playing song-->
                <Label Grid.Row="1" Content="{Binding Path=NowPlaying.Song.Album, FallbackValue=Album?}" FontStyle="Italic" />
                <!-- TODO bind to now playing song-->
                <Label Grid.Row="2" Content="{Binding Path=NowPlaying.Song.Artist, FallbackValue=Artist?}" FontStyle="Italic" FontWeight="ExtraLight"/>
                <!-- TODO bind to now playing song-->
            </Grid>

            <!--Play/Pause, Skip, and time slider-->
            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="50*" />
                    <RowDefinition Height="50*" />
                </Grid.RowDefinitions>

                <!--Play/Pause and Skip Buttons -->
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*" />
                        <ColumnDefinition Width="1*" />
                    </Grid.ColumnDefinitions>
                    <ToggleButton Content="Play/Pause" Name="playPause" IsChecked="{Binding PlayPauseState}"/>
                    <!--TODO-->
                    <Button Grid.Column="1" Content="Skip" Name="skipNowPlaying" Command="{Binding SkipCommand}"/>
                    <!--TODO-->
                </Grid>
                <Slider Grid.Row="1" Name="timeSlider" VerticalAlignment="Center" Value="{Binding Path=Player.Position}"/>
                <!--TODO-->
            </Grid>

            <Slider Grid.Column="2" Orientation="Vertical" HorizontalAlignment="Center" Name="volumeSlider" Value="{Binding Path=Player.Volume}"/>
            <!--TODO-->

        </Grid>

    </Grid>
</UserControl>
